{assign var=product_id value=$obj->getId()}
{if $_userLoggedIn and $userCanComment}
<a href="#" title="{'write your opinion about this product'|t}" class="writeYourOpinion">{'write your opinion about this product'|t}</a>
<div id="writeYourOpinion" class="hidden">
<div class="formWriteOpinion">
<form name="writeYourOpinion" action="{url label=SaveNewComment}" method="post"  class="form-comment" id="fr-opinion">
	<h3>{'Write your opinion'|t}</h3>
	<br/>
	<div class="formItem">
		<p>Opinion title</p>
		<input type="text" name="opinion_title" value="{'enter text...'|t}" rel="{'enter text...'|t}" class="defInTxt focusin"/>
	</div>
	
	<div class="formItem">
		<p>Opinion body</p>
		<textarea rows="5" cols="20" name="opinion_content" class="defInTxt focusin" rel="{'enter text...'|t}">{'enter text...'|t}</textarea>
	</div>
	
	
	<br/>
	<h3>{'How do you rate product'|t} ?</h3>
	
	{foreach from=$vote item=obj name=vote}
		
		<div class="rateItems">
			<p>{$obj->getName()}</p>
			<div class="rate">
				<div class="legend">bad</div>
					<input name="star[{$obj->getId()}]" type="radio" class="star" value="1" />
					<input name="star[{$obj->getId()}]" type="radio" class="star" value="2" />
					<input name="star[{$obj->getId()}]" type="radio" class="star" value="3" checked="checked" />
					<input name="star[{$obj->getId()}]" type="radio" class="star" value="4" />
					<input name="star[{$obj->getId()}]" type="radio" class="star" value="5" />
				<div class="legend">good</div>
			</div>
		</div>
	{/foreach}
	
	<div class="clearBoth"></div>
	
	<br/>
	<input type="hidden" name="id" value="{$product_id}" />
	<input type="submit" name="submit" value="{'Rate this product'|t}" class="submit"/>
</form>
</div>
</div>
{else}
	<a href="#" title="{'write your opinion about this product'|t}" class="writeYourOpinion tooltip">{'write your opinion about this product'|t}</a>
{/if}